@extends('Layout/userbase')

@section('header-js')
<link rel="stylesheet" type="text/css" href="{{ asset('css/base.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('css/member.css') }}">

<link rel="stylesheet" type="text/css" href="{{ asset('css/home.css') }}">
<script type="text/javascript" src="{{ asset('js/js-tab.js') }}"></script>

@endsection

@section('content')

<div class="member-right fr">
    <div class="member-head">
        <div class="member-heels fl"><h2>订单号：{{ $order->id }}</h2></div>
        <div class="member-backs fr"><a href="{{ route('orderlist') }}">返回订单首页</a></div>
    </div>
    <div class="member-border">
       <div class="member-order">
           <dl>
               <dt>订单信状态</dt>
               @php
               $statu = [1 => '未支付', 2 => '已取消', 3 => '支付超时，自动取消', 4 => '待发货', 5 => '待收货', 6 => '待评价', 7 => '交易完成', 8 => '用户已删除'];
               @endphp
               <dd class="member-seller">{{ $statu[$order->status] }} <a href="javascipt:;" onclick="alert('哈哈哈哈或！这是假的')">（物流查询）</a> </dd>
           </dl>
           <dl class="member-custom clearfix ">
               <dt>订单信息</dt>
               <dd>订单编号：{{ $order->o_num }}</dd>
               <dd>订单金额：{{ $order->total }}</dd>
               <dd>付款时间：{{ $order->pay_at }}</dd>
               <dd>发货时间：{{ $order->send_at }}</dd>
           </dl>
           <dl>
               <dt>配送信息</dt>
               <dd class="member-seller"><span>收件人信息：<em>{{ $order->getname }}</em></span> <span>{{ $order->phone }}</span> <span>{{ $order->address }}</span></dd>
           </dl>
           <dl>
               <dt>商品信息</dt>
               <dd class="member-seller">本订单是由"Yui"发货并且提高售后服务，商品在下单后会尽快给您发货。 </dd>
           </dl>
       </div>
       <div class="member-serial">
           <ul>
               <li class="clearfix">
                   <div class="No2">品名</div>
                   <div class="No3">数量</div>
                   <div class="No4">单价</div>
                   <div class="No5" style="width:207px">小计</div>
               </li>
               @foreach($orderDetail as $detail)
               <li class="clearfix">
                   <div class="No2"><a href="#">{{ $detail->gname }}</a> </div>
                   <div class="No3">{{ $detail->buynum }}</div>
                   <div class="No4">￥{{ $detail->price }}</div>
                   <div class="No5" style="width:207px">￥{{ $detail->desc }}</div>
               </li>
               @endforeach
           </ul>
       </div>
    </div>
    <div class="member-settle clearfix">
        <div class="fr">
            <div><span>商品金额：</span><em>￥{{ $order->total - $payment }}</em></div>
            <div><span>运费：</span><em>￥{{ $payment }}</em></div>
            <div class="member-line"></div>
            <div><span>共需支付：</span><em>￥{{ $order->total }}</em></div>
        </div>
    </div>
</div>
<!-- 商城快讯 End -->

@endsection
